home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 351-375 / disk_360 / uucp / uucp0.lzh / src / lib / tmpfile.c < prev    next >
C/C++ Source or Header  |  1990-04-04  |  570b  |  30 lines

  1.  
  2. /*
  3.  *  TMPFILE.C
  4.  *
  5.  *  $Header: Beta:src/uucp/src/lib/RCS/tmpfile.c,v 1.1 90/02/02 12:08:29 dillon Exp Locker: dillon $
  6.  *
  7.  *  (C) Copyright 1989-1990 by Matthew Dillon,  All Rights Reserved.
  8.  *
  9.  *  create a temporary file
  10.  *
  11.  *  template limited to 16 chars
  12.  */
  13.  
  14. #include <stdio.h>
  15. #include "config.h"
  16.  
  17. Prototype char *TmpFileName(const char *);
  18.  
  19. char *
  20. TmpFileName(template)
  21. const char *template;
  22. {
  23.     static char Template[256];
  24.     static unsigned short Idx;
  25.  
  26.     sprintf(Template, "%s-%08lx.TMP", template, (long)FindTask(NULL) + Idx++);
  27.     return(Template);
  28. }
  29.  
  30.